import http from "@/api";

/**
 * @name 网关管理模块
 */
// 获取网关列表
export const getGatewayList = (params = {}) => {
  return http.post(`/gateway/query`, params, { noLoading: true });
};
// 获取网关详情
export const getGatewayDtl = (params: { gatewayid: string }) => {
  return http.post(`/gateway/one`, params);
};
// 新增网关
export const addGateway = (params = {}) => {
  return http.post(`/gateway/create`, params, { noLoading: true });
};
// 编辑网关
export const editGateway = (params: { gatewayid: string }) => {
  return http.post(`/gateway/update`, params, { noLoading: true });
};

// 删除网关
export const deleteGateway = (params: { gatewayid: string }) => {
  return http.post(`/gateway/delete`, params);
};

// 导入网关
export const uploadExcle = (params: { excel: File }) => {
  return http.download(`gateway/import`, params, {
    headers: {
      "Content-Type": "multipart/form-data"
    }
  });
};
